function [H1,Hbar2,T2] = getChannel2(L,M,K,factor,H1,Hbar2,pathGain,pathGain_BS_LIS)
%UNTITLED6 此处显示有关此函数的摘要
%   此处显示详细说明
p_correlation = 0.3*ones(K,1);
K_factor = factor*ones(K,1);
for k = 1:K  
    for kk=1:L
        for ll=1:L
            T2(kk,ll,k) = (p_correlation(k))^(abs(kk-ll));
        end
    end
end
H1(:,:) = H1(:,:)*sqrt(L*pathGain_BS_LIS/trace(H1(:,:)*H1(:,:)'));
for ueIdx = 1:K
    T2(1:L,1:L,ueIdx) = pathGain(ueIdx)*(L/trace(T2(1:L,1:L,ueIdx)))*T2(1:L,1:L,ueIdx)/(K_factor(ueIdx)+1);
    Hbar2(ueIdx,1:L) = Hbar2(ueIdx,1:L) * sqrt(pathGain(ueIdx)) * sqrt(1/trace(Hbar2(ueIdx,1:L)*Hbar2(ueIdx,1:L)')) * sqrt(K_factor(ueIdx)/(K_factor(ueIdx)+1)) ;
end
end

